import 'package:flutter/material.dart';
import 'package:flutterapp/pages/BoilPage.dart';

class Quanzi extends StatefulWidget {
  Quanzi({Key? key}) : super(key: key);

  _QuanziState createState() => _QuanziState();
}

class _QuanziState extends State<Quanzi> {
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 7,
      child: Scaffold(
          appBar: AppBar(
            backgroundColor: new Color.fromRGBO(255,255,255,1.0),
            automaticallyImplyLeading: false,
            title: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Expanded(
                  child: TabBar(
                    isScrollable: true, //如果多个按钮的话可以滑动
                    indicatorColor: new Color.fromRGBO(35, 218, 212, 1.0),
                    labelColor: new Color.fromRGBO(35, 218, 212, 1.0),
                    unselectedLabelColor: new Color.fromRGBO(177,176,182, 1.0),
                    indicatorSize: TabBarIndicatorSize.label,
                    tabs: <Widget>[
                      Tab(text: "推荐"),
                      Tab(text: "文艺圈"),
                      Tab(text: "游戏圈"),
                      Tab(text: "运动圈"),
                      Tab(text: "投资圈"),
                      Tab(text: "兼职圈"),
                      Tab(text: "交友圈"),
                      // 职业圈，妈宝圈，兼职圈
                    ],
                  ),
                )
              ],
            ),
          ),
          body: TabBarView(
            children: <Widget>[
              BoilPage(),
              ListView(
                children: <Widget>[
                  ListTile(title: Text("第二个tab")),
                  ListTile(title: Text("第二个tab")),
                  ListTile(title: Text("第二个tab"))
                ],
              ),
              ListView(
                children: <Widget>[
                  ListTile(title: Text("第三个tab")),
                  ListTile(title: Text("第三个tab")),
                ],
              ),
              ListView(
                children: <Widget>[
                  ListTile(title: Text("第四个tab")),
                  ListTile(title: Text("第四个tab"))
                ],
              ),
              ListView(
                children: <Widget>[
                  ListTile(title: Text("第五个tab")),
                  ListTile(title: Text("第五个tab")),
                ],
              ),
              ListView(
                children: <Widget>[
                  ListTile(title: Text("第六个tab")),
                  ListTile(title: Text("第六个tab")),
                ],
              ),
              ListView(
                children: <Widget>[
                  ListTile(title: Text("第七个tab")),
                  ListTile(title: Text("第七个tab"))
                ],
              ),
            ],
          )),
    );
  }
}
